﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace DevExpress.MailClient.Win.Controls
{
    public partial class ucSearchFiles : PRO_DOCS.BLL.WIN.Templates.DevxPermissionUserControlTemplate
    {
        public ucSearchFiles()
        {
            InitializeComponent();
        }

        public MySearchOptions CURRENT_SELECTED_SEARCH_OPTION
        { get; set; }
        public enum MySearchOptions
        {
            N_A = 0,
            SimpleSearch,
            AdvancedSearch,
            SavedSearch,
            RecentSearch
        }

        //private void optSearch_CheckedChanged(object sender, EventArgs e)
        //{

        //    //CURRENT_SELECTED_SEARCH_OPTION = (MySearchOptions)Convert.ToInt32(((CheckEdit)sender).Tag.ToString());

        //    //switch (CURRENT_SELECTED_SEARCH_OPTION)
        //    //{
        //    //    case MySearchOptions.SimpleSearch:
        //    //        break;
        //    //    case MySearchOptions.AdvancedSearch:
        //    //        break;
        //    //    case MySearchOptions.SavedSearch:
        //    //        break;
        //    //    case MySearchOptions.RecentSearch:
        //    //        break;
        //    //    default:
        //    //        break;
        //    //}

        //    frmMain aPPLICATION_MAIN_FORM = (frmMain)this.ParentForm;
        //    aPPLICATION_MAIN_FORM.GET_SEARCH_OPTION_VIEW(CURRENT_SELECTED_SEARCH_OPTION);
        //}

        private void ucSearchFiles_Load(object sender, EventArgs e)
        {
            //CURRENT_SELECTED_SEARCH_OPTION = MySearchOptions.SimpleSearch;
            //frmMain aPPLICATION_MAIN_FORM = (frmMain)this.ParentForm;
            //aPPLICATION_MAIN_FORM.GET_SEARCH_OPTION_VIEW(CURRENT_SELECTED_SEARCH_OPTION);
        }

        private void optSimpleSearch_CheckedChanged(object sender, EventArgs e)
        {
            if (optSimpleSearch.Checked)
            {
                CURRENT_SELECTED_SEARCH_OPTION = MySearchOptions.SimpleSearch;
                frmMain aPPLICATION_MAIN_FORM = (frmMain)this.ParentForm;
                aPPLICATION_MAIN_FORM.GET_SEARCH_OPTION_VIEW(CURRENT_SELECTED_SEARCH_OPTION);
            }
        }

        private void optAdvancedSearch_CheckedChanged(object sender, EventArgs e)
        {
            if (optAdvancedSearch.Checked)
            {
                CURRENT_SELECTED_SEARCH_OPTION = MySearchOptions.AdvancedSearch;
                frmMain aPPLICATION_MAIN_FORM = (frmMain)this.ParentForm;
                aPPLICATION_MAIN_FORM.GET_SEARCH_OPTION_VIEW(CURRENT_SELECTED_SEARCH_OPTION);
            }
        }

        private void optMySavedSearch_CheckedChanged(object sender, EventArgs e)
        {
            if (optMySavedSearch.Checked)
            {
                CURRENT_SELECTED_SEARCH_OPTION = MySearchOptions.SavedSearch;
                frmMain aPPLICATION_MAIN_FORM = (frmMain)this.ParentForm;
                aPPLICATION_MAIN_FORM.GET_SEARCH_OPTION_VIEW(CURRENT_SELECTED_SEARCH_OPTION);
            }
        }

        private void optMyRecentSearch_CheckedChanged(object sender, EventArgs e)
        {
            if (optMyRecentSearch.Checked)
            {
                CURRENT_SELECTED_SEARCH_OPTION = MySearchOptions.RecentSearch;
                frmMain aPPLICATION_MAIN_FORM = (frmMain)this.ParentForm;
                aPPLICATION_MAIN_FORM.GET_SEARCH_OPTION_VIEW(CURRENT_SELECTED_SEARCH_OPTION);
            }
        }
    }
}
